﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/App.Master" Inherits="System.Web.Mvc.ViewPage<Permission>" %>

<%@ Import Namespace="Ornament.MemberShip.Permissions" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    请选择许可证所对应的资源
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <form id="form1" method="post" action='<%=Url.Action("SaveSelectResource",new{ id= this.Model.Id!=Guid.Empty?this.Model.Id.ToString():""}) %>'>
    <input type="hidden" id="forward" name="forward" />
    <input type="hidden" name="pathOfResourceType" value="<%=ViewData["pathOfResourceType"] %>" />
    <%
        Html.RenderPartial(ViewData["pathOfResourceType"].ToString(), this.Model);                    
    %>
    <div>
        <button type="submit" id="previous">
            上一步</button>
        <button type="submit" id="next">
            下一步</button>
        <button type="button" id="cancel">
            取消</button>
    </div>
    </form>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">

    <script type="text/javascript">
        $(document).ready(function() {
            $("#previous").click(function() {
                location = '<%=Url.Action("SelectResourceType",new{ id= this.Model.Id!=Guid.Empty?this.Model.Id.ToString():""}) %>';
            });

            $("#next").click(function() {
                $("#forward").val(true);
            });

            $("#previous").click(function() {
                $("#forward").val(false);
            });

            $('#cancel').click(function() {
                if (confirm("选择离开会失去当前数据.点击'确认'退出")) {
                    location = '<%=Url.Action("index")%>';
                }
            });
        }); 
    
    </script>

</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="PageTitle" runat="server">
    请选择许可证所对应的资源:
</asp:Content>
